﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Principal.Master" AutoEventWireup="true" CodeBehind="Pagos.aspx.cs" Inherits="Consulta.Web.Pages.Pagos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="GridviewDiv">
        <center>
            <asp:TextBox ID="txtFiltro" runat="server" Width="100px" Visible="false"></asp:TextBox>
            <asp:Label ID="lblNombre" runat="server" Text="" Font-Size="Small" Font-Bold="true"></asp:Label>
            <asp:ImageButton ID="imgBuscTerc" runat="server" ToolTip="Regresar a busqueda de terceros" ImageUrl="/img/Users.png" PostBackUrl="~/Pages/Terceros.aspx"/>
        <p>
            Desde:
            <asp:TextBox runat="server" ID="txtDesde" autocomplete="off" Width="70px"/>
            <ajaxToolkit:CalendarExtender ID="customCalendarExtender1" runat="server" 
                        Format="dd/MM/yyyy" TargetControlID="txtDesde"/>
            &nbsp;
            Hasta:
            <asp:TextBox runat="server" ID="txtHasta" autocomplete="off" Width="70px"/>
            &nbsp;<asp:Button ID="btnBuscar" runat="server" Text="Buscar" CssClass="Naranja"/>
            <ajaxToolkit:CalendarExtender ID="customCalendarExtender2" runat="server" 
                        Format="dd/MM/yyyy" TargetControlID="txtHasta"/>

        </p>
        <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSourceTercero" 
            AutoGenerateColumns="False" AllowSorting="true" AllowPaging="true"
            PageSize = "20" CssClass="Gridview">
                
<%--                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Center" />
                <PagerSettings FirstPageText="Primero" LastPageText="Ultimo"/>
                
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                <AlternatingRowStyle BackColor="#F7F7F7" />--%>
                <Columns>
                    <asp:BoundField DataField="Cia" HeaderText="Cia" SortExpression="Cia" />
                    <asp:BoundField DataField="Acreedor" HeaderText="Acreedor" SortExpression="Acreedor" Visible="false"/>
                    <asp:HyperLinkField DataTextField="Comprobante" HeaderText="Comprobante" SortExpression="Comprobante" 
                        DataNavigateUrlFormatString="~/Pages/Comprobante.aspx?Nit={0}" 
                        DataNavigateUrlFields="Comprobante" ItemStyle-HorizontalAlign="Right"/>
                    <asp:BoundField DataField="Fecha" HeaderText="Fecha" SortExpression="Fecha" HtmlEncode="False" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center"/>
                    <asp:BoundField DataField="Tipo" HeaderText="Tipo" SortExpression="Tipo" ItemStyle-HorizontalAlign="Center"/>
                    <asp:BoundField DataField="Documento" HeaderText="Documento" SortExpression="Documento" ItemStyle-HorizontalAlign="Right"/>
                    <asp:BoundField DataField="Valor"  HeaderText="Valor" SortExpression="Valor" DataFormatString="{0:n0}" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px"/>
                    <asp:BoundField DataField="Moneda" HeaderText="Moneda" SortExpression="Moneda" ItemStyle-HorizontalAlign="Center"/>
                    <asp:BoundField DataField="Conc" HeaderText="Conc" SortExpression="Conc" ItemStyle-HorizontalAlign="Center"/>
                    <asp:BoundField DataField="Cuenta" HeaderText="Cuenta" SortExpression="Cuenta"/>
                </Columns>
        </asp:GridView>
        </center>
        <asp:ObjectDataSource ID="ObjectDataSourceTercero" 
                          runat="server" 
                          SelectMethod="ConsultarPagos" 
                          TypeName="Consulta.Manager.MTercero" 
                          SortParameterName="pClausulaOrderBy">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtFiltro" Name="pFiltro" PropertyName="Text" Type="String" DefaultValue="" />
                <asp:ControlParameter ControlID="txtDesde" Name="pDesde" PropertyName="Text" Type="String" DefaultValue="" />
                <asp:ControlParameter ControlID="txtHasta" Name="pHasta" PropertyName="Text" Type="String" DefaultValue="" />
                <asp:Parameter Name="pClausulaOrderBy" Type="String" DefaultValue="Fecha" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
